﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Visa.DB;

namespace VisaApp.Models
{
    public class VisaResModel
    {
        public int Id { get; set; }
        public string Quoctich { get; set; }
        public string visadencacnuoc { get; set; }
        public string HoTen { get; set; }
        public string Dt { get; set; }
        public string DiaChi { get; set; }
        public string Email { get; set; }
        public string NoiDung { get; set; }
        public Nullable<bool> Status { get; set; }
        public Nullable<bool> Detele { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }
        public string TrangThaiXem { get; set; }
        public string ChauLucString { get; set; }
        public string regioncode { get; set; }
        public int quocgiaid { get; set; }
        public Nullable<bool> Type { get; set; }

        public static void MapFrom (VisaResModel model, ref VisaRe entity)
        {
            entity.Id = model.Id;
            entity.Quoctich = model.Quoctich;
            entity.visadencacnuoc = model.visadencacnuoc;
            entity.HoTen = model.HoTen;
            entity.DiaChi = model.DiaChi;
            entity.Email = model.Email;
            entity.NoiDung = model.NoiDung;
            entity.Status = model.Status;
            entity.Detele = model.Detele;
            entity.DateCreate = model.DateCreate;
            entity.Dt = model.Dt;
            entity.regioncode = model.regioncode;
            entity.Type = model.Type;
        }

        public static void MapFrom(VisaRe entity, ref VisaResModel model)
        {
            model.Id = entity.Id;
            model.Quoctich = entity.Quoctich;
            model.visadencacnuoc = entity.visadencacnuoc;
            model.HoTen = entity.HoTen;
            model.DiaChi = entity.DiaChi;
            model.Email = entity.Email;
            model.NoiDung = entity.NoiDung;
            model.Status = entity.Status;
            model.Detele = entity.Detele;
            model.DateCreate = entity.DateCreate;
            model.Dt = entity.Dt;
            model.regioncode = entity.regioncode;
            model.Type = entity.Type;
        }
    }
}